<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>auxclick</title>
	<style>
	  .hide {
		  display: none;
		}
	</style>
</head>
<body>
  <section>
    <p>辅助的click, 除了左键, 中键, 右键都会触发</p>
	  <p>好像还没有实现</p>
	  <p>资料: <a href="https://wicg.github.io/auxclick/">https://wicg.github.io/auxclick/</a></p>
	</section>
	<section>
	  <p>右键试试</p>
	  <div id="menu" class="hide">
		  contextmenu充当rightClick事件
		</div>
		<p>参考: <a href="http://blog.csdn.net/sunhengzhe/article/details/46843937">http://blog.csdn.net/sunhengzhe/article/details/46843937</a></p>
	</section>

	<script>
	  document.body.addEventListener('auxclick', function(e) {
		  console.log(e)
		})

		window.addEventListener('contextmenu', function(e){
		  console.log(e)
			e.preventDefault();
			menu.classList.toggle('hide')
		
		})
		
	</script>
	
</body>
</html>
